﻿<UserControl x:Class="CloudStorageLight.WpfClient.FolderMapWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                xmlns:properties="clr-namespace:CloudStorageLight.WpfClient.Properties"
             mc:Ignorable="d" 
             >
    <Grid>
        <ContentControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib" IsTabStop="False">
            <ContentControl.Resources>
                <ResourceDictionary>
                    <ResourceDictionary.MergedDictionaries>
                        <ResourceDictionary Source="/ViewMaker.Core;component/wpf/wpfgenericresource.xaml" />
                        <ResourceDictionary Source="/ViewMaker.Core;component/wpf/wpferrorstyleresource.xaml" />
                    </ResourceDictionary.MergedDictionaries>
                </ResourceDictionary>
            </ContentControl.Resources>
            <Grid Name="FolderMapVM" DataContext="{Binding Mode=OneWay}">
                <StackPanel Name="FolderMapVMDataPanel" Orientation="Vertical" Width="400" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Width="100" HorizontalContentAlignment="Left" VerticalAlignment="Center">
                            <TextBlock Text="{x:Static properties:Resources.MsgPath}" />
                        </Label>
                        <TextBox Name="Path" IsReadOnly="True" Text="{Binding Path=Path,Mode=OneWay}" Width="280" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1" />
                    </Grid>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                        <Grid HorizontalAlignment="Left">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Label Width="100" HorizontalContentAlignment="Left" VerticalAlignment="Center">
                                <TextBlock Text="{x:Static properties:Resources.MsgMappingFolder}" />
                            </Label>
                            <TextBox Name="LocalFolder" Text="{Binding Path=LocalFolder, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True }" Width="280" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1" />
                        </Grid>
                        <Button Name="SelectFolder" Command="{Binding Path=SelectFolder,Mode=OneWay}" Height="15" FontSize="10" >
                            <TextBlock Text="{x:Static properties:Resources.MsgSelect}" />
                        </Button>
                    </StackPanel>
                </StackPanel>
                <StackPanel Name="FolderMapVMButtonPanel" Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="0">
                    <Button Name="Save" Command="{Binding Path=Save,Mode=OneWay}" Margin="5">
                        <TextBlock Text="{x:Static properties:Resources.MsgSave}" />
                    </Button>
                    <Button Name="Close" Command="{Binding Path=Close,Mode=OneWay}" Margin="5">
                        <TextBlock Text="{x:Static properties:Resources.MsgClose}" />
                   </Button>
                </StackPanel>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
            </Grid>
        </ContentControl>
    </Grid>
</UserControl>
